const routes = [
  {
    path: '/',
    component: () => import('layouts/MyLayout.vue'),
    children: [{ path: '', component: () => import('pages/Index.vue') }],
    meta: { requireAuth: true }
  },
  {
    path: '/login',
    component: () => import('pages/login.vue'),
    meta: { requireAuth: false }
  }
]

// Always leave this as last one
if (process.env.MODE !== 'ssr') {
  routes.push({
    path: '*',
    component: () => import('pages/Error404.vue')
  })
}

// routes.beforeEach((to, from, next) => {})

export default routes
